<?php

global $_GPC, $_W;
$GLOBALS['frames'] = $this->getMainMenu();
$info = pdo_get('zhjr_plan',array('id'=>$_GPC['id']));
if(checksubmit('submit')){//添加推荐股
$data['gp_name']=$_GPC['gp_name'];
 $data['gid']=$_GPC['gid'];
  $data['dq_date']=$_GPC['dq_date'];
  $data['qq_cost']=$_GPC['qq_cost'];
  $data['days']=$_GPC['days'];
  $data['start_time']=strtotime($_GPC['start_time']);
  $data['end_time']=strtotime($_GPC['end_time']);
  $data['rc_total']=$_GPC['rc_total'];
  $data['rcbj']=$_GPC['rcbj'];
  $data['rc_num']=$_GPC['rc_num'];
 $data['time']=time();
 $data['uniacid']=$_W['uniacid'];
 if($_GPC['id']==''){
 $rst=pdo_insert('zhjr_plan',$data);
}else{
  $rst=pdo_update('zhjr_plan',$data,array('id'=>$_GPC['id']));
}
 if($rst){
     message('添加成功！', $this->createWebUrl('plan'), 'recommend');
 }else{
  message('添加失败！','','error');
 
}
}

include $this->template('web/addplan');